package org.bigjava.buff.user.mapper;

import org.bigjava.buff.user.bean.Deal;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface DealMapper {


    //创建交易
    int createDeal(Deal deal);

    //查询用户的交易
    List<Deal> selectDeal(Map map);

    //查询物品交易
    Deal getGoodsDeal(Map map);

    //通过goodsID来查询外观
    List getExterByGoodsId(Integer goodsId);

    //求交易物品平均数
//    Double getNewGoodsAgv()

    //获取最新交易集合
    public List<Deal> getNewDeal(Integer num);

    //下架商品
    int soldOutGoods(Integer dId);

    //根据交易号来获取订单详情
    Deal getDealByOrderNum(String orderNum);

    //关闭交易
    int closeDeal(Integer did);

    //获取交易
    List<Deal> getDeal(Map map);

    //获取交易总条数
    int getDealTotal(int dealType);

    List getNewDeal();


}
